const puppeteer = require("puppeteer");
const { config } = require("./puppteer.config");



async function testing(uri) {
    const data = {
        result: null
    }
    const browser = await puppeteer.launch({
        headless: false,
        defaultViewport: null
    })
    const page = await browser.newPage()
    // await addCookies(config.cookieString, page, config.domain)
    await page.setUserAgent(config.userAgent)
    // page.on('response', async res => {
    //     if (res._url.includes('/s')) {
    //         const result = await res.text()

    //         data.result = result
    //     }


    // })
    await page.goto( uri )
    setTimeout(async () => {
        await page.$('.rich_media_content')
  
        const content = await page.content()
        console.log(content)
    }, 1000);
    // await page.close()
    // await browser.close()
    // return data


}